//定义Music类，里面有音乐名name，音乐市场times属性，并有
//播放play功能和返回本身属性信息的功能方法getInfo
public class Homework18 {
    public static void main(String[] args) {
        Music music = new Music("Breaking the habit", "3:50");
        System.out.println(music.play());
        System.out.println(music.getInfo());
    }
}

class Music {
    String name;
    String times;
    Music(String name, String times) {
        this.name = name;
        this.times = times;
    }
    public String play() {
        return "正在播放：" + name;
    }
    public String getInfo() {
        return "歌名：" + name + " 时长：" + times;
    }
}
//第十题答案：100，101